<?php

namespace admin\controllers;

use admin\components\BaseAuthController;
use app\models\Report;

class ReportController extends BaseAuthController {

    public $name = '举报管理';

    public function actionIndex() {
        $model = new Report();
        $model->with = ['profile', 'profiled'];
        $dataProvider = $model->search($this->getParam());
        return $this->render(compact('dataProvider'));
    }

    public function actionView($id) {
        return $this->render(['model' => $this->findModel($id, Report::className())]);
    }
}
